using System;

namespace Mbs.Messaging
{
    [Flags]
    [Serializable]
    public enum MessageListnerType : uint
    {
        None = 0,
        ReceivingException = 1,

        ObserverAdding = 2,
        ObserverRemoving = 4,
        ObserverAdded = 8,
        ObserverRemoved = 16,
        Observer = ObserverAdding | ObserverRemoving | ObserverAdded | ObserverRemoved,

        PreFilterAdding = ObserverRemoved * 2,
        PreFilterRemoving = PreFilterAdding * 2,
        PreFilterAdded = PreFilterRemoving * 2,
        PreFilterRemoved = PreFilterAdded * 2,
        PreFilter = PreFilterAdding | PreFilterRemoving | PreFilterAdded | PreFilterRemoved,

        FilterAdding = PreFilterRemoved * 2,
        FilterRemoving = FilterAdding * 2,
        FilterAdded = FilterRemoving * 2,
        FilterRemoved = FilterAdded * 2,
        Filter = FilterAdding | FilterRemoving | FilterAdded | FilterRemoved,

        Sending = FilterRemoved * 2,
        Sent = Sending * 2,
        Send = Sending | Sent,
        Receiving = Sent * 2,
        Received = Receiving * 2,
        Receive = Receiving | Received,
        All = ReceivingException | Observer | PreFilter | Filter | Send | Receive
    }
}
